package com.leet.code.simple_array;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @author: WYG
 * @time: 2020/12/15 21:48
 */

public class DuplicateZeros {
    public void duplicateZeros(int[] arr) {
        Map<Integer, Integer> map = new HashMap<>();
        for (Map.Entry<Integer,Integer> set : map.entrySet()) {

        }
        int temp = 0;
        for (int i = 0; i < arr.length - 1; i++) {
            if (arr[i] == 0) {
                for (int j = arr.length - 1; j > i + 1; j--) {
                    arr[j] = arr[j-1];
                }
                arr[i+1] = 0;
                i++;
            }
        }
    }
}
